home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / graphics / h-m / jpegaga / s / createmap next >
Encoding:
AmigaDOS Script File  |  1995-12-21  |  742 b   |  42 lines

  1. .key source/a,option
  2. .bra {
  3. .ket }
  4.  
  5. ;$VER: CreateMap 1.1 (7.12.94)
  6.  
  7. ;This shell script creates the .map files for jpegAGA
  8. ;Use the CreateMapBig script for big pictures
  9.  
  10. ;Changes in version 1.1
  11. ;- file names with spaces are supported
  12.  
  13.  
  14. ;USAGE: CreateMap file
  15.  
  16. ;NOTE: You need a directory JPEGTMP: on your hard disk
  17. ;      (and enough space on that partition)
  18.  
  19.  
  20. FailAt 21
  21.  
  22. djpeg "{source}" JPEGTMP:temp.ppm
  23.  
  24. IF ERROR
  25.  
  26.   delete >NIL: JPEGTMP:temp.ppm
  27.   echo "Fatal error: could not decode JPEG file."
  28.   QUIT 20
  29.  
  30. ENDIF
  31.  
  32. ppm2aga JPEGTMP:temp.ppm "{source}.map" -jpegAGA {option}
  33.  
  34. IF ERROR
  35.   delete >NIL: JPEGTMP:temp.ppm
  36.   delete >NIL: "{source}.map"
  37.   echo "Fatal error: could not create map file."
  38.   QUIT 20
  39. ENDIF
  40.  
  41. delete >NIL: JPEGTMP:temp.ppm
  42.